package javaFeatures.src.TestFeature.oopcourse;

public class User {
    private String account;
    private String password;
    private String email;

    public User(String account,String password,String email){
        this.account=account;
        this.password=password;
        this.email=email;
    }
    public User(String account,String password){
        this.account=account;
        this.password=password;
        this.email=null;
    }
    public void showUserInfo(){
        System.out.println("请输入账号"+account);
        System.out.println("请输入密码："+"******");
        System.out.println("请输入邮箱（爱填不填）："+(email!=null?email:"用户拒绝给email"));
    }
    public static void main(String[] args){
        User user1=new User("qimobuguake","123456","user1@163.com");
        User user2=new User("suibiandemingzi","567892");

        System.out.println("用户1的信息为：");
        user1.showUserInfo();
        System.out.println("用户2的信息为：");
        user2.showUserInfo();
    }

}
